# $Id: PKGBUILD 181132 2013-03-31 23:20:08Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: damir <damir@archlinux.org>

pkgname=uim
pkgver=1.8.5
pkgrel=1
pkgdesc='Multilingual input method library'
url='http://code.google.com/p/uim/'
license=('custom:BSD')
arch=('i686' 'x86_64')
depends=('libxft' 'libedit' 'anthy' 'm17n-lib')
makedepends=('intltool' 'gettext' 'qt4' 'gtk2' 'gtk3' 'gnome-panel')
optdepends=('qt4: immodule and helper applications'
            'gtk2: immodule and helper applications'
            'gtk3: immodules and helper applications'
            'gnome-panel: gnome applet indicator')
options=('!libtool')
source=("http://uim.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")
sha1sums=('13178e0ad9e9196e3fdb0bb9806e4add8fe3a8e5')

install=install

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"

	./configure \
		--prefix=/usr \
		--libexecdir=/usr/lib/uim \
		--with-anthy-utf8 \
		--with-qt4-immodule \
		--with-qt4 \

	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
	rm "${pkgdir}"/usr/lib/libgcroots.a
	install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
